package com.hl.testdb.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Created by Administrator on 2016/9/5 0005.
 */
public class DBHelper extends SQLiteOpenHelper {
    private static final String DB_NAME = "test.db";
    private static int VERSION = 1;

    public DBHelper(Context context) {
        super(context, DB_NAME, null, VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        String rateTable = "CREATE TABLE person(service_id integer primary key  AUTOINCREMENT ,name char(50),age integer);";

        db.execSQL(rateTable);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
